package com.starinside.wp.components.redis;

import java.util.Map;

/**
 * Created by Tim.Yao
 * on 2017/3/19.
 *
 * @author: yaoting@digitalchina.com
 * @version: 1.0
 */

public interface RedisService {

    void pushFromHead(String key, String value);

    void pushFromTail(String key, String value);

    String removeFromHead(String key);

    String removeFromTail(String key);

    Long getKeySize(String key);

    void saveMap(final String key, Map map);

    void saveMap(final String key, long expireTime, Map map);

    void saveValue(final String key, String value);

    void saveValue(final String key, long expireTime, String value);

    void refreshTime(final String key, long expireTime);

    String getValue(final String key);

    boolean deleteLike(final String key);

    Map getMap(final String key);

    boolean delKey(final String key);
}
